package com.ruoyi.project.mes.vehicleControl.controller;

import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.project.mes.vehicleControl.domain.vo.BindInVo;
import com.ruoyi.project.mes.vehicleControl.domain.vo.BindRecordInVo;
import com.ruoyi.project.mes.vehicleControl.domain.vo.BindRecordOutVo;
import com.ruoyi.project.mes.vehicleControl.service.BatteryBindService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * 电池包绑定
 *
 * @author ruoyi
 */
@RestController
@RequestMapping("/mes/vehicleControl/batteryBind")
public class BatteryBindController extends BaseController {

    @Autowired
    private BatteryBindService batteryBindService;

    /**
     * 查询电池包绑定记录
     */
    @GetMapping("/listBindRecord")
    public AjaxResult listBindRecord(BindRecordInVo inVo) {
        BindRecordOutVo outVo = batteryBindService.listBindRecord(inVo);
        return AjaxResult.success(outVo);
    }

    /**
     * 电池包绑定
     */
    @PostMapping("/bind")
    public AjaxResult bind(@RequestBody BindInVo inVo) {
        batteryBindService.bind(inVo);
        return AjaxResult.success();
    }


}
